﻿using ConfExpert.Forms.Base;
using DevTeam;

using System;
using System.Data;

namespace ConfExpert.Forms.SatinAlma.YeniYapi.Confirmation
{
    public partial class UreticiSec : XForm
    {
        DataTable t;
        public UreticiSec(DataTable t)
        {
            InitializeComponent();
            this.t = t;
        }

        private void UreticiSec_Load(object sender, EventArgs e)
        {
            gridView1.Init(t);
            gridView1.MakeReadOnly();
            gridView1.BestFitColumns();
            gridView1.DoubleClick += gridView1_DoubleClick;
        }

        public int VendorId;
        void gridView1_DoubleClick(object sender, EventArgs e)
        {
            if (gridView1.GetFocusedDataRow() != null)
            {
                VendorId = gridView1.GetFocusedDataRow()["VendorId"].ToInt();
                this.DialogResult = System.Windows.Forms.DialogResult.OK;
            }
        }
    }
}
